<template>
  <div class="about-container">
    <van-nav-bar
      title="关于我们"
      left-arrow
      @click-left="router.back()"
      :border="false"
      class="custom-nav"
    />
    <div class="content">
      <div class="header-card">
        <div class="logo">
          <h1>新学堂</h1>
        </div>
        <p class="version">版本 {{ version }}</p>
        <div class="app-info">
          <div class="info-item">
            <van-icon name="friends-o" size="20" />
            <span>{{ userCount }}+ 用户</span>
          </div>
          <div class="info-item">
            <van-icon name="video-o" size="20" />
            <span>{{ courseCount }}+ 课程</span>
          </div>
          <div class="info-item">
            <van-icon name="star-o" size="20" />
            <span>{{ rating }} 评分</span>
          </div>
        </div>
      </div>

      <div class="content-card">
        <section class="about-section">
          <div class="section-header">
            <van-icon name="flag-o" size="20" />
            <h3>关于我们</h3>
          </div>
          <p>新学堂是一个致力于为用户提供优质在线学习体验的教育平台。我们的使命是让学习变得更加便捷、高效和有趣。</p>
          <div class="feature-grid">
            <div class="feature-item">
              <van-icon name="smile-o" size="28" />
              <h4>优质体验</h4>
              <p>精心设计的学习界面</p>
            </div>
            <div class="feature-item">
              <van-icon name="certificate" size="28" />
              <h4>专业内容</h4>
              <p>权威认证的课程资源</p>
            </div>
            <div class="feature-item">
              <van-icon name="clock-o" size="28" />
              <h4>灵活学习</h4>
              <p>随时随地开始学习</p>
            </div>
            <div class="feature-item">
              <van-icon name="service-o" size="28" />
              <h4>贴心服务</h4>
              <p>24小时在线支持</p>
            </div>
          </div>
        </section>

        <section class="contact-section">
          <div class="section-header">
            <van-icon name="phone-o" size="20" />
            <h3>联系我们</h3>
          </div>
          <div class="contact-list">
            <div class="contact-item">
              <van-icon name="envelop-o" />
              <div class="contact-info">
                <label>邮箱</label>
                <span>support@xinxuetang.com</span>
              </div>
            </div>
            <div class="contact-item">
              <van-icon name="phone-o" />
              <div class="contact-info">
                <label>电话</label>
                <span>400-123-4567</span>
              </div>
            </div>
            <div class="contact-item">
              <van-icon name="location-o" />
              <div class="contact-info">
                <label>地址</label>
                <span>北京市海淀区中关村大街1号</span>
              </div>
            </div>
          </div>
        </section>

        <section class="social-section">
          <div class="section-header">
            <van-icon name="share-o" size="20" />
            <h3>关注我们</h3>
          </div>
          <div class="social-grid">
            <div class="social-item">
              <van-icon name="wechat" size="32" />
              <span>微信公众号</span>
            </div>
            <div class="social-item">
              <van-icon name="weibo" size="32" />
              <span>官方微博</span>
            </div>
            <div class="social-item">
              <van-icon name="friends-o" size="32" />
              <span>QQ群</span>
            </div>
          </div>
        </section>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();
const version = 'v1.0.0';
const userCount = '10,000';
const courseCount = '500';
const rating = '4.8';
</script>

<style lang="scss" scoped>
.about-container {
  min-height: 100vh;
  background-color: #f7f8fa;
  
  .custom-nav {
    background: transparent;
    
    :deep(.van-nav-bar__title) {
      color: #333;
      font-weight: 600;
    }
    
    :deep(.van-icon) {
      color: #333;
    }
  }
  
  .content {
    padding: 16px;
    
    .header-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 16px;
      padding: 32px 24px;
      background: linear-gradient(135deg, var(--van-primary-color), var(--van-primary-color-dark));
      border-radius: 16px;
      color: #fff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      
      .logo {
        margin-bottom: 16px;
      }
      
      h1 {
        margin: 0;
        font-size: 24px;
        font-weight: 600;
      }
      
      .version {
        margin-bottom: 24px;
        font-size: 14px;
        opacity: 0.8;
      }
      
      .app-info {
        display: flex;
        gap: 24px;
        
        .info-item {
          display: flex;
          align-items: center;
          
          .van-icon {
            margin-right: 4px;
          }
          
          span {
            font-size: 14px;
          }
        }
      }
    }
    
    .content-card {
      background: #fff;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 2px 12px rgba(100, 101, 102, 0.08);
      
      section {
        margin-bottom: 32px;
        
        &:last-child {
          margin-bottom: 0;
        }
        
        .section-header {
          display: flex;
          align-items: center;
          margin-bottom: 16px;
          
          .van-icon {
            margin-right: 8px;
            color: var(--van-primary-color);
          }
          
          h3 {
            font-size: 18px;
            font-weight: 600;
            color: #333;
          }
        }
        
        p {
          line-height: 1.8;
          color: #666;
          margin-bottom: 24px;
        }
        
        .feature-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 16px;
          
          .feature-item {
            padding: 16px;
            background: #f8f8f8;
            border-radius: 12px;
            text-align: center;
            
            .van-icon {
              color: var(--van-primary-color);
              margin-bottom: 8px;
            }
            
            h4 {
              margin: 8px 0 4px;
              font-size: 16px;
              color: #333;
            }
            
            p {
              margin: 0;
              font-size: 12px;
              color: #999;
            }
          }
        }
        
        .contact-list {
          .contact-item {
            display: flex;
            align-items: center;
            padding: 16px;
            background: #f8f8f8;
            border-radius: 8px;
            margin-bottom: 12px;
            
            &:last-child {
              margin-bottom: 0;
            }
            
            .van-icon {
              font-size: 24px;
              color: var(--van-primary-color);
              margin-right: 12px;
            }
            
            .contact-info {
              display: flex;
              flex-direction: column;
              
              label {
                font-size: 12px;
                color: #999;
                margin-bottom: 4px;
              }
              
              span {
                color: #333;
              }
            }
          }
        }
        
        .social-grid {
          display: flex;
          justify-content: space-around;
          margin-top: 16px;
          
          .social-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            
            .van-icon {
              color: var(--van-primary-color);
              margin-bottom: 8px;
            }
            
            span {
              font-size: 12px;
              color: #666;
            }
          }
        }
      }
    }
  }
}
</style>
